import math
def is_prime(n):
    '''check if integer n is a prime'''
    n = abs(int(n))
    if n < 2:
        return False
    if n == 2: 
        return True    
    if n%2 == 0: 
        return False
    for x in range(3, int(n/2)+1):
        if n % x == 0:
            return False
    return True
def prime_power(Number):
	'''check if integer Number is a prime power'''
	firstfactor = 0
	if is_prime(Number):
		return True
	else: 
	  	for k in xrange(2, int(math.sqrt(Number+1))+1):
	  		if ( Number % k ) == 0 :
	  			firstfactor = k
	  			break;
	  	
        if is_prime(firstfactor) == False:
            return False
  	    
        q = Number
        i = 0
        while (i==0):
            if q == 1:
                return True
            
            if (q % firstfactor == 0):
                q = q/firstfactor
            else: 
                return False
                   

print 'Print Prime Power'
n = raw_input("Nhap so n: ")
for i in xrange (2, int(n)):
    if prime_power(i) == True:
        print str(i)  
    
